package hello.o;



import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;


public class ToastButton3Activity extends Activity implements OnClickListener{
    /** Called when the activity is first created. */
   
	Button button1;
    EditText editText1;
    
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
         editText1 = (EditText) findViewById(R.id.editText1);
        editText1.setText("Toooast");
          button1 = (Button) findViewById(R.id.button1);
          button1.setOnClickListener(this);
    }

	public void onClick(View v) {
		// TODO Auto-generated method stub
		if(v.equals(button1))
		{
		Toast.makeText(this,editText1.getText().toString(), Toast.LENGTH_LONG).show();	
		}
	}
}
